# 1.+ 运算符(数据拼接)
# python中的字符串、列表和元组支持 + 运算符
str1 = "hello"
str2 = "world"
print(str1 + str2)
l1 = [1, "b", 3]
l2 = [1, 1, 1]  # [1, 'b', 3, 1, 1, 1]
print(l1 + l2)
s1 = (1, 'a', 2)
s2 = ('b', 3)
print(s1 + s2)  # (1, 'a', 2, 'b', 3)

# 2.* 运算符
# 字符串、列表、元组可以与整数进行乘法运算,运算之后产生的结果为原数据类型的整数倍的拼接
l1 = [1, 2, 3, "a", "b", "c"]
print(l1 * 2)  # [1, 2, 3, 'a', 'b', 'c', 1, 2, 3, 'a', 'b', 'c']

# 3.in not in 运算符
# 字符串,列表,元组,集合和字典都支持成员运算符
l1 = [1, 2, 3, "a", "b", "c"]
print(1 in l1)  # True
print("c" not in l1)  # False
